package com.mail.dubbo.mapper;

import com.mail.model.db.UmsAdmin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 后台用户表 Mapper 接口
 * </p>
 *
 * @author WJZ
 * @since 2022-06-20
 */
public interface UmsAdminMapper extends BaseMapper<UmsAdmin> {

	/**
	 * 根据 id 修改状态
	 * @param id
	 * @param status
	 */
	@Update("update ums_admin set status = #{status} where id = #{id}")
	void updateStatusById(@Param("id") Long id,@Param("status") Integer status);

	/**
	 * 根据用户名修改密码
	 * @param username
	 * @param password
	 */
	@Update("update ums_admin set password = #{password} where username = #{username}")
	void updatePasswordByUsername(@Param("username") String username,@Param("password") String password);
}
